package com.example.xm.controller;

import com.example.xm.Entity.Image;
import com.example.xm.servive.ImageServive;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@RestController
@RequestMapping("/I")
public class ImageController {
    @Autowired
    ImageServive imageServive;

    @GetMapping("/img")
    public List<Image> getAllKg(){
        return imageServive.getAllImg();
    }
}
